#include <stdio.h>

int main(int argc, char const *argv[])
{
    int n;
    printf("请输入整数n的值：\n");
    scanf("%d",&n);

    if(n > 0 && (n & (n-1)) == 0)
    {
        printf("该整数%d是2的幂次\n",n);
    }  
    else
        printf("该整数%d不是2的幂次\n",n);

    return 0;
}
